import { useState } from "react";
import Header from "@/components/Header";
import List from "@/components/List";
import { reqGitHubUserList } from "@/api";
import "./App.less";
const App = () => {
  //数据: 用户列表
  const [userList, setUserList] = useState([]);
  //数据:用户是否开始搜索

  const [searchStart, setSearchStart] = useState(false);
  //数据: 是否正在搜索中
  const [isSearching, setIsSearching] = useState(false);

  return (
    <div style={{ width: "900px", margin: "0 auto" }}>
      <Header
        setUserList={setUserList}
        setSearchStart={setSearchStart}
        setIsSearching={setIsSearching}
      />
      <List
        userList={userList}
        searchStart={searchStart}
        isSearching={isSearching}
      />
    </div>
  );
};

export default App;
